<template>
	<view class="py-[200rpx]">
		<view class="header" style="">
			<image class="pic" src="@/static/order/seasonSUccess@2x.png" mode="aspectFill"></image>
			
		</view>
		<view class="header-1">
			<view class="header-text">
				支付成功
			</view>
			<view class="header-num ">
				<text class="text-[40rpx]">￥</text>
				<text class="">{{price}}</text>
			<!-- 	￥{{price}} -->
			</view>
			<view class="header-button">
				<view class="" style="margin-right:20rpx ;">
					<up-button @click="lookOreder()" text="查看订单" shape="circle"  :customStyle="{height:'66rpx',width: '174rpx'}"></up-button>
					
				</view>
				<view class=""  >
					<up-button @click="goHome()" color="#FE861C" text="返回首页" shape="circle"  :customStyle="{height:'66rpx',width: '174rpx'}"></up-button>
					
				</view>
			</view>
		</view>
	</view>
</template>

<script setup>
	import {ref,reactive} from 'vue'
	import {newpay} from "@/api/order.js"
	import {onLoad,onShow,onUnload} from '@dcloudio/uni-app';
	let price = ref()
	let orderId = ref()
	onLoad((e)=>{
		price.value = e.totle
		orderId.value = e.orderId
		console.log("eeee",e);
	})
	//查看订单
	let lookOreder = () =>{
		// sj2023112310440523301176
		uni.navigateTo({
			// url:'/page_order/submitanorder/payment/paySuccess/paySuccessBack' 
			 url:'/page_order/orderDetalis/orderDetalisNomap/orderDetalisNomap?orderNo=' + 	orderId.value
		})
	}
	//返回首页
	let goHome = ()=>{
		uni.switchTab({
			url:'/pages/index/index'
		})
	}
	onUnload(()=>{
			 // uni.navigateBack(-3)
			//如果多端发布的话判断一下当前操作的客户端
			//#ifdef MP-WEIXIN
			wx.switchTab({
				url: '/pages/order/order'
			})
			//#endif 
	}) 
</script>

<style lang="scss">
	.header-1{
		text-align: center;
	
		.header-text{
				padding: 25rpx 0 30rpx 0;
				font-size: 32rpx;
				font-family: PingFang SC;
				font-weight: bold;
				color: #000000;
		}
		.header-num{
			font-size: 54rpx;
			font-family: PingFang SC;
			font-weight: bold;
			color: #000000;
		}
		.header-button{
			display: flex;
			justify-content: center;
			margin-top: 66rpx;
			
		}
	}
	.header{
		display: flex;
		justify-content: center;
		margin-top: 64rpx;
	}
.pic{
	width: 311rpx;
	height: 195rpx;
	
}
</style>
